package com.zjm.behavioral.command;

public class TVOnCommand implements Command {
    private final TVReceiver tv;

    public TVOnCommand(TVReceiver tv) {
        this.tv = tv;
    }

    @Override
    public void execute() {

        // 调用接收者方法
        tv.on();

    }

    @Override
    public void undo() {

        // 调用接收者方法
        tv.off();
    }
}
